﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SalesEdit.aspx.cs" Inherits="Announcement.Admin.SalesEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>车位、车库拟对外销售情况</title>
    <link href="../css/Default.css" rel="stylesheet" type="text/css" />
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <header id="top">
		<div class="wrapper">
			<!-- Title/Logo - can use text instead of image -->
			<div id="title">
			<a href="../Admin/ApplyMgr.aspx">
			<img SRC="../img/lzfcjys_logo.png" alt="lzfcjys" />
			</a>
			</div>
			<!-- Top navigation -->
			<div id="topnav">
				<a href="#"><img class="avatar" SRC="../img/user_32.png" alt="" /></a>
				Logged in as <b>admin</b>
				<span>|</span> <asp:LinkButton ID="lbtnExit" runat="server" 
                    onclick="lbtnExit_Click">退出</asp:LinkButton><br />
			</div>
			
			
			<!-- End of Aside links -->
		</div>
	</header>
    <div id="pagetitle">
        <div class="wrapper">
            <h1>
                首页 &rarr; 公告申请表 &rarr; 销售方案 &rarr; <span>销售情况</span></h1>
        </div>
    </div>
    <div class="clear">
        &nbsp;</div>
    <div id="mainbox">
        <div>
            <asp:ObjectDataSource ID="odsGarageDetails" runat="server" DeleteMethod="Delete"
                InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetDataByGid"
                TypeName="Announcement.DAL.DataSetGarageDetailsTableAdapters.T_Garage_DetailsTableAdapter"
                UpdateMethod="Update">
                <DeleteParameters>
                    <asp:Parameter Name="Original_Id" Type="Int64" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="Garage_Id" Type="Int32" />
                    <asp:Parameter Name="Number" Type="String" />
                    <asp:Parameter Name="Area" Type="Double" />
                    <asp:Parameter Name="UnitPrice" Type="Decimal" />
                    <asp:Parameter Name="TotalPrice" Type="Decimal" />
                    <asp:Parameter Name="Original_Id" Type="Int64" />
                </UpdateParameters>
                <SelectParameters>
                    <asp:QueryStringParameter Name="Id" QueryStringField="GarageId" Type="Int32" />
                </SelectParameters>
                <InsertParameters>
                    <asp:Parameter Name="Garage_Id" Type="Int32" />
                    <asp:Parameter Name="Number" Type="String" />
                    <asp:Parameter Name="Area" Type="Double" />
                    <asp:Parameter Name="UnitPrice" Type="Decimal" />
                    <asp:Parameter Name="TotalPrice" Type="Decimal" />
                </InsertParameters>
            </asp:ObjectDataSource>
            <asp:ListView ID="lvGarageDetails" runat="server" DataKeyNames="Id" DataSourceID="odsGarageDetails"
                InsertItemPosition="LastItem" OnItemCreated="lvGarageDetails_ItemCreated">
                <ItemTemplate>
                    <tr style="background-color: #DCDCDC; color: #000000;">
                        <asp:HiddenField ID="hfId" runat="server" Value='<%# Eval("Id") %>' />
                        <asp:HiddenField ID="hfGId" runat="server" Value='<%# Eval("Garage_Id") %>' />
                        <td>
                            <asp:Label ID="NumberLabel" runat="server" Text='<%# Eval("Number") %>' />
                        </td>
                        <td>
                            <asp:Label ID="AreaLabel" runat="server" Text='<%# Eval("Area") %>' />
                        </td>
                        <td>
                            <asp:Label ID="UnitPriceLabel" runat="server" Text='<%# Eval("UnitPrice") %>' />
                        </td>
                        <td>
                            <asp:Label ID="TotalPriceLabel" runat="server" Text='<%# Eval("TotalPrice") %>' />
                        </td>
                        <td>
                            <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" class="btn btn-blue" />
                            <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" class="btn btn-red" />
                        </td>
                    </tr>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <table runat="server" style="background-color: #FFFFFF; border-collapse: collapse;
                        border-color: #999999; border-style: none; border-width: 1px;">
                        <tr>
                            <td>
                                未返回数据。
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
                <InsertItemTemplate>
                    <tr>
                        <asp:HiddenField ID="hfGId" runat="server" Value='<%# Bind("Garage_Id") %>' />
                        <td>
                            <asp:TextBox ID="NumberTextBox" runat="server" Text='<%# Bind("Number") %>' />
                        </td>
                        <td>
                            <asp:TextBox ID="AreaTextBox" runat="server" Text='<%# Bind("Area") %>' />
                        </td>
                        <td>
                            <asp:TextBox ID="UnitPriceTextBox" runat="server" Text='<%# Bind("UnitPrice") %>' />
                        </td>
                        <td>
                            <asp:TextBox ID="TotalPriceTextBox" runat="server" Text='<%# Bind("TotalPrice") %>' />
                        </td>
                        <td>
                            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="插入" class="btn btn-green" />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="清除" class="btn" />
                        </td>
                    </tr>
                </InsertItemTemplate>
                <LayoutTemplate>
                    <table id="itemPlaceholderContainer" runat="server" width="100%" class="display stylized">
                        <tr runat="server" style="background-color: #DCDCDC; color: #000000;">
                            <th runat="server">
                                车位号
                            </th>
                            <th runat="server">
                                套内面积
                            </th>
                            <th runat="server">
                                单价
                            </th>
                            <th runat="server">
                                总价
                            </th>
                            <th runat="server">
                            </th>
                        </tr>
                        <tr id="itemPlaceholder" runat="server">
                        </tr>
                    </table>
                </LayoutTemplate>
                <EditItemTemplate>
                    <tr style="background-color: #008A8C; color: #FFFFFF;">
                        <asp:HiddenField ID="hfId" runat="server" Value='<%# Eval("Id") %>' />
                        <asp:HiddenField ID="hfGId" runat="server" Value='<%# Bind("Garage_Id") %>' />
                        <td>
                            <asp:TextBox ID="NumberTextBox" runat="server" Text='<%# Bind("Number") %>' />
                        </td>
                        <td>
                            <asp:TextBox ID="AreaTextBox" runat="server" Text='<%# Bind("Area") %>' />
                        </td>
                        <td>
                            <asp:TextBox ID="UnitPriceTextBox" runat="server" Text='<%# Bind("UnitPrice") %>' />
                        </td>
                        <td>
                            <asp:TextBox ID="TotalPriceTextBox" runat="server" Text='<%# Bind("TotalPrice") %>' />
                        </td>
                        <td>
                            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="更新" class="btn btn-green" />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="取消" class="btn" />
                        </td>
                    </tr>
                </EditItemTemplate>
                <SelectedItemTemplate>
                    <tr style="background-color: #008A8C; font-weight: bold; color: #FFFFFF;">
                        <asp:HiddenField ID="hfId" runat="server" Value='<%# Eval("Id") %>' />
                        <asp:HiddenField ID="hfGId" runat="server" Value='<%# Bind("Garage_Id") %>' />
                        <td>
                            <asp:Label ID="NumberLabel" runat="server" Text='<%# Eval("Number") %>' />
                        </td>
                        <td>
                            <asp:Label ID="AreaLabel" runat="server" Text='<%# Eval("Area") %>' />
                        </td>
                        <td>
                            <asp:Label ID="UnitPriceLabel" runat="server" Text='<%# Eval("UnitPrice") %>' />
                        </td>
                        <td>
                            <asp:Label ID="TotalPriceLabel" runat="server" Text='<%# Eval("TotalPrice") %>' />
                        </td>
                        <td>
                            <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" class="btn btn-blue" />
                            <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" class="btn btn-red" />
                        </td>
                    </tr>
                </SelectedItemTemplate>
            </asp:ListView>
            <asp:LinkButton ID="lbtnBack" runat="server" OnClick="lbtnBack_Click">返回</asp:LinkButton>
        </div>
    </div>
    <footer id="bottom">
		<div class="wrapper">
			<p>Copyright &copy; 2010 <b><a href="http://www.lzfcjys.com" title="www.lzfcjys.com">www.lzfcjys.com</a></b> | Icons by <a href="http://www.lzfcjys.com">柳州市房产交易管理网</a></p>
		</div>
	</footer>
    </form>
</body>
</html>
